<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
require_once( dirname(__FILE__) . '/../components/helpers.php');
//define('PRODUCTION_SERVER',1);
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Customer Connect 2012',

	// preloading 'log' component
	'preload'=>array('log'),

    // autoloading model and component classes
    'import' => array(
        'application.models.*',
        'application.components.*',
        'application.utils.*',
        'application.utils.pdf.*',
        'application.utils.db.*',        
        'application.utils.contract.*',
    ),
    'behaviors' => array(
        'onBeginRequest' => array(
            'class' => 'application.components.Forcehttps'
        )
    ),
 

	// application components
	'components'=>array(
                'coreScript'=>array(
                    'class'=>'ClientScript',
                ),
                'fileHelper'=>array(
                    'class'=>'ext.filehelper.FileHelper',
                ),
                'swiftMailer' => array(
                    'class' => 'ext.swiftMailer.SwiftMailer',
                ),
                'authManager'=>array(
                    'class'=>'srbac.components.SDbAuthManager',
                    'connectionID'=>'db',
                    'itemTable'=>'tbl_items',
                    'assignmentTable'=>'tbl_assignments',
                    'itemChildTable'=>'tbl_itemchildren',
                ),
                'simpleImage'=>array(
                    'class' => 'application.extensions.CSimpleImage',
                ),
				'user'=>array(
					// enable cookie-based authentication			
                    'class'=>'application.components.ConsoleUser',
                    'primaryKey'=>'0004',
                    'defaultEmail'=>'michael.bonza@qsibanking.com'
				),
                'session'=>array(
                    'class'=>'system.web.CHttpSession',
                    'autoStart'=>true
                ),
		// uncomment the following to enable URLs in path-format
		/*
		'urlManager'=>array(
			'urlFormat'=>'path',
			'rules'=>array(
				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			),
		),
		*/
		/*
		'db'=>array(
			'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
		),
		*/
		// uncomment the following to use a MySQL database
		
		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=customerconnect',
			'emulatePrepare' => true,
			'username' => 'customerconnect',
			'password' => 'dbCust0m3rC0nn3ct',
			'charset' => 'utf8',
		),
		
		'errorHandler'=>array(
			// use 'site/error' action to display errors
            'errorAction'=>'site/error',
        ),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'david.tran@bonzahouse.com',
                'emailPassword'=>'HGy>dg9<',
                'noImage'=>'images/noimage.jpg',
                'encryptKey'=>'123'
	),
);